/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uk.ac.staffs.student.autopilot.packet;

/**
 * 
 * @author Peter
 */
public class TelemetryAccelsPacket implements PacketInterface {

    private final int dataType;
    private final int accelX;
    private final int accelY;
    private final int accelZ;
    private final int checkSum;

    @Override
    public int getPacketType() {

        return dataType;
    }

    @Override
    public String getPayload() {
        // TODO Auto-generated method stub
        return "" + accelX + accelY + accelZ + "";
    }

    @Override
    public String toString() {
        return "TelemetryAccelsPacket [dataType=" + dataType + ", accelX="
                + accelX + ", accelY=" + accelY + ", accelZ=" + accelZ
                + ", checkSum=" + checkSum + "]";
    }

    public TelemetryAccelsPacket(final int dataType, final int accelX,
            final int accelY, final int accelZ, final int checkSum) {

        this.dataType = dataType;
        this.accelX = accelX;
        this.accelY = accelY;
        this.accelZ = accelZ;
        this.checkSum = checkSum;
    }

    /**
     * @return the accelX
     */
    public int getAccelX() {
        return accelX;
    }

    /**
     * @return the accelY
     */
    public int getAccelY() {
        return accelY;
    }

    /**
     * @return the accelZ
     */
    public int getAccelZ() {
        return accelZ;
    }

    /**
     * @return the checkSum
     */
    @Override
    public int getCheckSum() {
        return checkSum;
    }

    /**
     * @return the dataType
     */
    public int getDataType() {
        return dataType;
    }

}
